package net.maku.member.service;

import net.maku.framework.mybatis.service.BaseService;
import net.maku.member.entity.MemberUserTokenEntity;
import net.maku.member.vo.MemberUserTokenVO;

/**
 * @Author: qr
 * @Date: 2025/3/24 23:17
 * @Version 1.0
 */
public interface MemberUserTokenService extends BaseService<MemberUserTokenEntity> {

    /**
     * 根据用户ID，生成用户Token
     *
     * @param userId 用户ID
     * @return 用户Token
     */
    MemberUserTokenVO createToken(Long userId);

    /**
     * 根据refreshToken，生成新Token
     *
     * @param refreshToken refreshToken
     * @return 用户Token
     */
    MemberUserTokenVO refreshToken(String refreshToken);

    /**
     * Token过期
     *
     * @param userId 用户ID
     */
    void expireToken(Long userId);

}
